﻿using Mobile_VTBL.Models;
using Mobile_VTBL.Models.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Mobile_VTBL.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            ViewBag.Event = GetItemEvent();
            return View();
        }

        private List<Event> GetItemEvent()
        {
            List<Event> l = new List<Event>();
            using (var db = new DataContext())
            {
                l = db.Events.ToList();
            }
            return l;
        }

    }
}
